package com.huawei.appmarket.service.store.awk.card;

import android.content.Context;
import com.huawei.appgallery.foundation.card.base.normal.bean.NormalCardBean;
import java.util.List;
import o.azb;
import o.epr;
import o.CollectCheck;
import o.ewm.d;

public class HorizontalSlidingCard extends NormalHorizonCard {
    public HorizontalSlidingCard(Context context) {
        super(context);
    }

    public void ˎ() {
        super.ˎ();
        this.ᐝ.ˋ(azb.ˊ(this.ʼॱ) - ॱˋ());
        this.ᐝ.ॱ(ˋॱ());
    }

    protected int ˏॱ() {
        return 0;
    }

    protected boolean ˏ(Context context, List<NormalCardBean> list) {
        if (CollectCheck.isEmpty(list)) {
            return false;
        }
        if ((this.ʼॱ.getResources().getDimensionPixelSize(d.ʻ) + ˋॱ()) * list.size() > azb.ॱ(context)) {
            return true;
        }
        return false;
    }

    private int ˋॱ() {
        return ॱˎ() - (ॱˋ() * 2);
    }

    private int ॱˋ() {
        return this.ʼॱ.getResources().getDimensionPixelOffset(d.ͺॱ);
    }

    private int ॱˎ() {
        Object obj = this.ʼॱ.getResources().getConfiguration().orientation == 2 ? 1 : null;
        if (!epr.ˎ().ॱॱ() || obj == null) {
            return this.ʼॱ.getResources().getDimensionPixelSize(d.ॱॱ);
        }
        return this.ʼॱ.getResources().getDimensionPixelSize(d.ˑॱ);
    }
}
